<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>配送费管理</title>
    <link rel="stylesheet" href="../../../elementUI/index.css">
    <link rel="stylesheet" href="../../../css/index.css">
</head>

<body>
    <div id="app" class="minWidth">
        <el-form :inline="true">
            <!-- <el-form-item>
                <el-button type="danger">批量删除</el-button>
            </el-form-item> -->
            <el-form-item>
                <el-button type="primary" @click="addEnterprise">添加</el-button>
            </el-form-item>
            <el-form-item>
                <el-select v-model="form.Store_SerialNumber" @change="query" clearable>
                    <el-option v-for="(item,index) in select_list" :label="item.Store_Name"
                        :value="item.Store_SerialNumber"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="query">查询</el-button>
            </el-form-item>
        </el-form>

        <el-table border height="calc(100vh - 140px)" stripe style="width: 100%" :data="tableData"
            @expand-change="getChildrentab">
            <el-table-column align="center" width="50" type="expand">
                <template slot-scope="{row}">
                    <el-table :data="row.Children.delivery_detail" style="margin: 5px auto 0; width: 98%;" border>
                        <el-table-column label="配送范围">
                            <template slot-scope="scope">
                                <span>{{ scope.row.Delivery_Distance }}公里</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="配送费">
                            <template slot-scope="scope">
                                <span>{{ scope.row.Delivery_Amount }}元</span>
                            </template>
                        </el-table-column>
                        <el-table-column label="免配送费金额">
                            <template slot-scope="scope">
                                <span>{{ scope.row.Sales_Amount }}元</span>
                            </template>
                        </el-table-column>
                    </el-table>
                </template>
            </el-table-column>
            <el-table-column align="center" label="序号" type="index" width="100">
            </el-table-column>
            <el-table-column prop="Store_Name" align="center" label="店铺名称">
            </el-table-column>
            <el-table-column prop="longitude" align="center" label="经度">
            </el-table-column>
            <el-table-column prop="latitude" align="center" label="纬度">
            </el-table-column>
            <el-table-column prop="Operation_Datetime" align="center" label="操作时间">
            </el-table-column>
            <el-table-column align="center" label="操作">
                <template v-slot="{row}">
                    <el-button size="small" type="primary" @click="new_xt(row.Delivery_SerialNumber)">修改</el-button>
                    <el-button size="small" type="danger" @click="omitMember(row.Delivery_SerialNumber)">删除</el-button>
                </template>
            </el-table-column>
        </el-table>

        <el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange"
            :current-page="form.page" :page-sizes="[100, 200, 300, 400]" :page-size="100"
            layout="total, sizes, prev, pager, next, jumper" :total="total" style="position: fixed;bottom: 0;">
        </el-pagination>
    </div>
    <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
    <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
    <script type="text/javascript" src="../../../js/vue.min.js"></script>
    <script type="text/javascript" src="../../../elementUI/index.js"></script>
    <script type="text/javascript" src="../../../js/utils.js"></script>
    <script type="text/javascript" src="./js/Deliveryfees.js"></script>
</body>

</html>